package com.net.xpay.core.domain;

import com.net.common.domain.VersionedDomain;
import com.net.xpay.core.enums.UserWithdrawStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 用户提现记录
 * @author 86188
 * @author 86188
 */
@Getter
@Setter
@NoArgsConstructor
public class UserWithdrawRecord extends VersionedDomain {

    @ApiModelProperty(notes = "用户编号")
    private Long userId;

    @ApiModelProperty(notes = "业务id")
    private String bizNo;

    @ApiModelProperty(notes = "支付宝id")
    private Long alipayUserId;

    @ApiModelProperty(notes = "提现状态")
    private UserWithdrawStatus payStatus;

    @ApiModelProperty(notes = "明细失败错误码")
    private String errorCode;

    @ApiModelProperty(notes = "明细失败错误原因 操作备注也可以放这个字段")
    private String errorMsg;

    @ApiModelProperty(notes = "转账金额 单位分")
    private Long transferMoney;

    @ApiModelProperty(notes = "系统转账时间或者关闭时间")
    private LocalDateTime endTime;

    @ApiModelProperty(notes = "真实姓名")
    private String realName;

    @ApiModelProperty(notes = "支付宝账号")
    private String alipayNickName;

    public static UserWithdrawRecord getInstance() {
        UserWithdrawRecord instance = new UserWithdrawRecord();
        instance.setPayStatus(UserWithdrawStatus.WAIT_PAY);
        return instance;
    }
}